Skip to content

Add AGENTS.md for AI agent onboarding#2663

Merged
kubevirt-bot merged 1 commit intokubevirt:mainfrom
RamLavi:add_agents_md
Apr 13, 2026
Merged

Add AGENTS.md for AI agent onboarding#2663
kubevirt-bot merged 1 commit intokubevirt:mainfrom
RamLavi:add_agents_md

Conversation

@RamLavi
Copy link
Copy Markdown
Collaborator

@RamLavi RamLavi commented Apr 5, 2026

What this PR does / why we need it:
This PR adds an AGENTS.md to the repo

This provides project structure, build/test commands, Go conventions, and development workflow context for AI coding agents.

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 5, 2026
@kubevirt-bot kubevirt-bot requested review from oshoval and phoracek April 5, 2026 06:31
@RamLavi
Copy link
Copy Markdown
Collaborator Author

RamLavi commented Apr 5, 2026

/retest

@RamLavi
Copy link
Copy Markdown
Collaborator Author

RamLavi commented Apr 5, 2026

regarding the flake, I opened an issue on kubvirt/kubevirt kubevirt/kubevirt#17397

@RamLavi
Copy link
Copy Markdown
Collaborator Author

RamLavi commented Apr 9, 2026

@maiqueb can you take a look?

Copy link
Copy Markdown
Contributor

@ormergi ormergi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, please see my comments

Comment thread AGENTS.md Outdated

Cluster Network Addons Operator (CNAO) is a Kubernetes operator that deploys and manages networking add-on components on Kubernetes and OpenShift clusters. It provides a single `NetworkAddonsConfig` CRD to declaratively manage the lifecycle of multiple network plugins, including upgrades, monitoring, and placement configuration.

## Architecture
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rm empty header

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

Comment thread AGENTS.md Outdated
### Core Components

- **cmd/manager/** - Operator entry point; sets up the controller-runtime manager, scheme, metrics server, and health probes
- **pkg/controller/networkaddonsconfig/** - Main reconciliation loop (`networkaddonsconfig_controller.go`) and pod controller for status tracking
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would omit the "reconciliation" wording, this is controller-runtime jargon that could confuse the model and increase its potential for slops.
The critical part saying its the NAC controller is already there.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, do you mean MAC controller?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

network-addons-config CRD controller

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the wording

Comment thread AGENTS.md
@@ -0,0 +1,175 @@
This file provides guidance when working with code in this repository.

## Repository Overview
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part should cover what the repository consist of, for example:

  • CNAO operator code
  • Fetch and generate installation manifests for each component it manages (via the components.yaml)
  • e2e tests
  • development/test environment setup
  • installation manifests

Please consider removing the NetworkAddonsConfig part its already exist in "How It Works"

Copy link
Copy Markdown
Collaborator Author

@RamLavi RamLavi Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE, is that OK now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks

Comment thread AGENTS.md Outdated
tools/ Build helpers (bumper, manifest-templator, metrics docs)
cluster/ Local dev cluster management (kubevirtci)
manifests/ Release manifests for OLM
templates/ CSV templates
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSV templetes is pretty ambiguous, please add more context at least saying these are manifests for deploying the project with Operator-Lifecycle-Manager

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

Comment thread AGENTS.md Outdated

- **Go version**: 1.25 (max allowed; auto-installed to `build/_output/bin/go/` via `hack/install-go.sh`)
- **Build flags**: `GOFLAGS=-mod=vendor GO111MODULE=on CGO_ENABLED=0`
- **Linting**: golangci-lint v2 with 30+ linters (see `.golangci.yml`)
Copy link
Copy Markdown
Contributor

@ormergi ormergi Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linters are not actual part of the build toolchain, and its external tool (outside Go binary). Please consider removing this part.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

Provides project structure, build/test commands, Go conventions,
and development workflow context for AI coding agents.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ram Lavi <ralavi@redhat.com>
@RamLavi
Copy link
Copy Markdown
Collaborator Author

RamLavi commented Apr 13, 2026

Change: Address @ormergi's review

@sonarqubecloud
Copy link
Copy Markdown

Comment thread AGENTS.md
### Core Components

- **cmd/manager/** - Operator entry point; sets up the controller-runtime manager, scheme, metrics server, and health probes
- **pkg/controller/networkaddonsconfig/** - Main controller loop (`networkaddonsconfig_controller.go`) and pod controller for status tracking
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
How about:

Suggested change
- **pkg/controller/networkaddonsconfig/** - Main controller loop (`networkaddonsconfig_controller.go`) and pod controller for status tracking
- **pkg/controller/networkaddonsconfig/** - NetworkAddonsConfig resource controller. The project main controller.

@ormergi
Copy link
Copy Markdown
Contributor

ormergi commented Apr 13, 2026

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2026
@RamLavi
Copy link
Copy Markdown
Collaborator Author

RamLavi commented Apr 13, 2026

/approve

@kubevirt-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RamLavi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2026
@kubevirt-bot kubevirt-bot merged commit 8617ecf into kubevirt:main Apr 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants